package com.hx.order.service;


import com.hx.common.result.PageResult;
import com.hx.order.pojo.Drug;

import java.util.*;

/**
 * drug业务逻辑层
 */
public interface DrugService {


    public List<Drug> findAll();


    public PageResult<Drug> findPage(int page, int size);


    public List<Drug> findList(Map<String,Object> searchMap);


    public PageResult<Drug> findPage(Map<String,Object> searchMap,int page, int size);


    public Drug findById(Long id);

    public void add(Drug drug);


    public void update(Drug drug);


    public void delete(Long id);

    /**
     * 根据drugId减库存
     */
    public void updateDrugNum(Integer num,String id);

    /**
     * 根据id加库存
     * @param num
     * @param id
     */

    public void addDrugNum(Integer num,String id);
}
